package com.sky.mapper;

import com.sky.annotation.AutoFill;
import com.sky.entity.SetmealDish;
import com.sky.enumeration.OperationType;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * @author 32338
 * @date 2024-04-12 19:04:11
 * @description
 */
@Mapper
public interface SetmealDishMapper {

    /**
     * @description
     ***:根据菜品ids来查询套餐ids
     **/
    List<Long> getSetmealIdsByDishIds(List<Long> dishIds);

    /**
     * @description
     ***:批量保存套餐与菜品的关系
     **/
    void insertBatch(List<SetmealDish> setmealDishes);

    /**
     * @description
     ***:根据套餐id删除套餐和菜品的关系
     **/
    @Delete("delete from setmeal_dish where setmeal_id = #{setmealId}")
    void deleteBySetmealId(Long setmealId);
}
